next up previous contents index
Next: Labels Up: Pascal Tokens Previous: Identifiers

Numbers

Numbers are denoted in decimal notation. Real (or decimal) numbers are written using engeneering notation (e.g. 0.314E1).

Free Pascal supports hexadecimal format the same way as Turbo Pascal does. To specify a constant value in hexadecimal format, prepend it with a dollar sign ($). Thus, the hexadecimal $FF equals 255 decimal.

In addition to the support for hexadecimal notation, Free Pascal also supports binary notation. You can specify a binary number by preceding it with a percent sign (%). Thus, 255 can be specified in binary notation as %11111111.

The following diagrams show the syntax for numbers.


Numbers

syntdiag668

syntdiag672

syntdiag676

syntdiag680

syntdiag684

syntdiag688

syntdiag692

syntdiag696

syntdiag700

next up previous contents index
Next: Labels Up: Pascal Tokens Previous: Identifiers

Michael Van Canneyt
Fri Sep 25 09:15:40 MEST 1998